<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
            var arrs=["Ameria","GrAeece","Britain","Canada","China","Egypt"];
            var ciShu=0;
            for(var i=0;i<arrs.length;i++){
                if(arrs[i].indexOf("a")!=-1||arrs[i].indexOf("A")!=-1){
                    ciShu++;
                }
                document.write(arrs[i]+"<br />");
            }
            document.write("单词中包含a或者A的个数："+ciShu+"个");
		</script>
	</body>

</html>